package com.huxi.lang.local.support;

import java.util.Locale;
import java.util.Objects;

import com.huxi.lang.local.DateContext;
import com.huxi.lang.local.FestivalStrategy;
import com.huxi.lang.local.LocalContext;

/**
 * 本地化应用环境接口默认实现
 * 
 * @since 1.0
 * @author jian.wu
 */
public class DefaultLocalContext implements LocalContext {

	private final Locale locale;
	private final DateContext dateContext;
	private final FestivalStrategy festivalStrategy;

	public DefaultLocalContext(Locale locale, DateContext dateContext, FestivalStrategy festivalStrategy) {
		this.locale = Objects.requireNonNull(locale);
		this.dateContext = Objects.requireNonNull(dateContext);
		this.festivalStrategy = festivalStrategy;
	}

	@Override
	public Locale getLocale() {
		return locale;
	}

	@Override
	public DateContext getDateContext() {
		return dateContext;
	}

	@Override
	public FestivalStrategy getFestivalStrategy() {
		return festivalStrategy;
	}

}
